/**   
 * Copyright © 2018 eSunny Info. Tech Ltd. All rights reserved.
 * 
 * @Package: com.wxsoft.java.demo 
 * @author: chenliang   
 * @date: 2018年8月9日 下午4:02:47 
 */
package com.wxsoft.java.demo;

import java.util.Random;

/**
 * @author chenliang
 *
 */
class A{
	static final int initNum = 50;
	static final int initNum2 = test2.rand.nextInt(100);
	static {
		System.out.println("Initializing A");
	}
}
class B{
	static final int initNum = 100;
	static {
		System.out.println("Initializing B");
	}
}
class C{
	static final int initNum = 200;
	static {
		System.out.println("Initializing C");
	}
}

public class test2 {
	public static Random rand = new Random(100);
	public static void main(String[] args) throws ClassNotFoundException{
		Class init = A.class;
		System.out.println(A.initNum);
		System.out.println(A.initNum2);
		System.out.println(B.initNum);
		Class init2 = Class.forName("com.wxsoft.java.demo.C");
		System.out.println(C.initNum);
	}
}
